#include <iostream>
using namespace std;

/*
    多重继承语法规则:
    class 子类的名字:public 父类1,public 父类2  //公有继承
               {

               }
    子类大小:  所有父类大小之和+子类本身的大小，满足字节对齐
*/

class Catamount
{
public:
    void eat()
    {
        cout << "catamount eat" << endl;
    }
    void sleep()
    {
        cout << "catamount sleep" << endl;
    }

private:
    int age;
};

class Mammal
{
public:
    void eat()
    {
        cout << "mammal eat" << endl;
    }
    void sleep()
    {
        cout << "mammal sleep" << endl;
    }

private:
    float weight;
};

class Cat : public Catamount, public Mammal
{
public:
    void miao()
    {
        cout << "cat miao" << endl;
    }

    void eat()
    {
        cout << "cat eat" << endl;
    }

    void sleep()
    {
        cout << "cat sleep" << endl;
    }

private:
    string name;
};

int main()
{
    Cat cat;
    cat.eat();
    cat.sleep();
    cat.miao();
    return 0;
}